
<div class="slider-inner">
	<div id="da-slider" class="da-slider">
<?php
            $data = Posting::model()->findAll('jenis_id=2 and posting=1 order by id desc');

            foreach($data as $row){
            ?>  
    
        <div class="da-slide">
			<h1 class="judul"><?php echo $row->judul; ?></h1>
				<p><?php echo $row->deskripsi; ?></p>
					<a href="<?php echo Yii::app()->createUrl('posting/view',array('id'=>$row->id)); ?>" ><?php echo CHtml::button('Selengkapnya'); ?></a>
				<div class="da-img">
					<img src="<?php echo Yii::app()->request->baseUrl; ?>/images/berita/<?php echo $row->image; ?>" border="0" style="width:350px;height:220px;" />
				</div>            
        </div>        
        
        <div class="da-arrows">
            <span class="da-arrows-prev"></span>
            <span class="da-arrows-next"></span>
        </div>
			 <?php
              }
             ?>  
    </div>
    <!--/da-slider-->

</div><!--/slider-->
<!--=== End Slider ===-->



<!--=== Content Part ===-->
<div class="container">

<!-- Info Blokcs -->
<div class="row">
    <!-- Welcome Block -->
    <div class="col-md-7">
        <div class="judul-index">
                  <h3>
                    <img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_48.jpg' border='0'  />
                    Berita
                  </h3>
        </div>

            <?php
            $berita = Posting::model()->findAll('posting=1 order by id desc limit 5');

            foreach($berita as $rowBerita){

            ?>    
            <div class="col-md-2" style="margin-bottom:15px">
                <img id='img_16' class="beritafoto" src="<?php echo Yii::app()->request->baseUrl; ?>/images/berita/<?php echo $rowBerita->image; ?>" border='0'  />
            </div>

            <div class="col-md-8" style="margin-bottom:15px">
                <span class="spantglberita"> 
                    <?php echo date('d-m-Y',strtotime($rowBerita->created_time)); ?>
                </span>
                <br />
                <span class="spanjudulberita">
                    <a href="<?php echo Yii::app()->createUrl('posting/view',array('id'=>$rowBerita->id)); ?>" ><?php echo $rowBerita->judul; ?></a>
                </span>
                <br />
                <span class="spandetailberita">
                    <?php echo $rowBerita->deskripsi; ?>
                </span>
            </div>


            <hr class="hrberita" />

            <?php
            }
            ?>
            


          

        <div class="div-buttonpengumuman" style="margin-top:15px;">
                <a href="<?php echo Yii::app()->createUrl('posting/list'); ?>"><img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_53.jpg' border='0'  /></a>
        </div>

        <!--blockquote class="hero-unify">
            <p>Award winning digital agency. We bring a personal and effective approach to every project we work on, which is why. Unify is an incredibly beautiful responsive Bootstrap Template for corporate professionals.</p>
            <small>CEO, Jack Bour</small>
        </blockquote-->
    </div>
    <!--/col-md-8-->

    <!-- column berita -->
    <div class="col-md-4">
        
        <div class="judul-index">
                  <h3>
                    <img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_49.jpg' border='0' />
                    Profil Pimpinan
                  </h3>
        </div>

        <div class="div-jabatan">
        <div id="slideshow">    
            
            
            <?php
            $pejabat=Pejabat::model()->findAll(array('order'=>'id_jabatan'));

            $i=0;
            foreach($pejabat as $rowPejabat){
            ?>

            <?php
            if($i==0){
            ?>
            <div style="display: block;">
            <?php
            }else{
            ?>
            <div style="display: none;">
            <?php    
            }   
            ?> 

            <div class="div-jabatanfoto">
            <img id='img_16' class="jabatanfoto" src='<?php echo Yii::app()->request->baseUrl; ?>/images/pejabat/<?php echo $rowPejabat->photo; ?>' border='0'  style="width:250px;height:360px;"   />    
            </div>
            <span class="text-jabatan1"><?php echo $rowPejabat->nama; ?></span><br />
            <span class="text-jabatan2"><?php echo $rowPejabat->jabatan; ?></span><br />
            </div>

            <?php
            }
            ?>
        </div>
        </div>
      
        <br />

        <div class="judul-index">
                  <h3>
                    <img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_51.jpg' border='0'  />
                    Pengumuman
                  </h3>
        </div>

        <div class="div-indexpengumuman">
            <div class="div-indexpengumuman2">
            
            <?php
            $pengumuman = Pengumuman::model()->findAll(array("limit"=>5));

            foreach($pengumuman as $rowPengumuman){
            ?>
            <div class="div-indexpengumuman3">
                <span class="tglpengumuman">
                    <a href="<?php echo Yii::app()->createUrl('pengumuman/view',array('id'=>$rowPengumuman->id)); ?>" >
                    <?php echo $rowPengumuman->judul_pengumuman; ?></span>
                    </a>
                <br />
                
            </div>    

            <hr class="hrpengumuman" />

            <?php
            }
            ?>

            <div class="div-buttonpengumuman" style="margin-left:-150px;margin-top:10px;">
                <a href="<?php echo Yii::app()->createUrl('pengumuman/list'); ?>"><img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_53.jpg' border='0'  /></a>
            </div>

            </div>

        </div>
		
		
		<br />

        <div class="judul-index">
                  <h3>
                    <img id='img_16' src='<?php echo Yii::app()->request->baseUrl; ?>/images/index/index_51.jpg' border='0'  />
                    Polling
                  </h3>
        </div>

        <div class="div-indexpengumuman">
            <div class="div-indexpengumuman2">
            
            <?php
			$this->widget('EPoll');
			?>

            </div>

        </div>

        

    </div>
    <!--/col-md-4-->
</div>
<!--/row-->
<!-- End Info Blokcs -->


<!-- End Our Clients -->
</div>
<!-- End Content Part -->




<script>
        $(function() {
        
            $("#slideshow > div:gt(0)").hide();
    
            setInterval(function() { 
              $('#slideshow > div:first')
                .fadeOut(1000)
                .next()
                .fadeIn(1000)
                .end()
                .appendTo('#slideshow');
            },  5000);
            
        });
    </script>


<style>
#slideshow { 
            position: relative; 
            width: 100%; 
            height: 100%; 
        }
        #slideshow > div { 
            position: absolute; 
            top: 10px; 
            left: 10px; 
            right: 10px; 
            bottom: 10px; 
        }
</style>